
import Vue from 'vue'
//引入Vuex
import Vuex from 'vuex'
import user from './user'
//应用Vuex插件
Vue.use(Vuex)
//准备actions——用于响应组件中的动作
const actions={
    clear({ commit }) {
        commit("$_removeStorage");
    }
}

const mutations={

}

const state={
    isShow:true,
    showArticle:false,
    articles:[],
    isLogin:false,
    sum:0,
    dataFromVuex:"this is a message from Vuex",
    user:{}
}

const getters={
    
}


export default new Vuex.Store({
	actions,
	mutations,
	state,
    getters,
    modules:{
        user
    }
})